* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #68e6b3;
    transition: .3s;
    perspective: 1000px;
    transform-style: preserve-3d;
    overflow: hidden;
    /* 让其溢出部分隐藏，不出现滚动条 */
}

.content {
    width: 1190px;
    margin: 100px auto;
    transform-style: preserve-3d;
}

.wrap {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    transform-style: preserve-3d;
}

.box {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 12px 0;
    transition: .3s;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
}

.box div {
    position: absolute;
    /* 让6个div在一个层面上，后续好transform */
    width: 100%;
    height: 100%;
    border: 10px solid #333;
    box-sizing: border-box;
    text-align: center;
    font-size: 50px;
    line-height: 130px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 3px 10px rgb(0, 0, 0);
}

/* 前面 */
.box div:nth-of-type(1) {
    transform: translateZ(75px);
}

/* 后面 */
.box div:nth-of-type(2) {
    transform: translateZ(-75px);
}

/* 上面 */
.box div:nth-of-type(3) {
    transform: rotateX(-90deg) translateZ(-75px);
}

/* 下面 */
.box div:nth-of-type(4) {
    transform: rotateX(90deg) translateZ(-75px);
}

/* 左面 */
.box div:nth-of-type(5) {
    transform: rotateY(90deg) translateZ(-75px);
}

/* 右面 */
.box div:nth-of-type(6) {
    transform: rotateY(-90deg) translateZ(-75px);
}